// 未通过代理的方法
var Flower = function() {}
var xiaoming = {
  sendFlower: function(target) {
    var flower = new Flower()
    target.receiveFlower (flower)
  }
}

var A = {
  receiveFlower: function(flower) {
    console.log("收到花"+ flower);
  }
}

xiaoming.sendFlower(A);


// 以下是引入代理B，通过B来送花
var flower = new function() {};

var xiaoming = {
  sendFlower: function(target) {
    var flower = new Flower();
    target.receiveFlower(flower)
  }
}

var B = {
  receiveFlower: function(flower) {
    A.receiveFlower(flower);
  }
}

var A = {
  receiveFlower: function(flower) {
    console.log("收到花" + flower)
  }
}

xiaoming.sendFlower(B);


